<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>petBoxy后台管理</title>

<link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.4.1/css/amazeui.min.css" />
<link rel="stylesheet" href="/resources/css/amazeui.min.css" />
<link href="/resources/css/main1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.detail{width: 600px;margin-left: 150px;}
#customers
  {
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  width:100%;
  border-collapse:collapse;
  }

#customers td, #customers th 
  {
  font-size:1em;
  border:1px solid #98bf21;
  padding:10px 0px 10px 0px;
  text-align:center;
  }

#customers th 
  {
  font-size:1.1em;
  text-align:center;
  padding-top:5px;
  padding-bottom:4px;
  background-color:#A7C942;
  color:#ffffff;
  }

#customers tr.alt td 
  {
  color:#000000;
  background-color:#EAF2D3;
  }
</style>
</head>
<body>
<div class="main">
	<div class="top">
	<img src="/resources/images/logo1.png"width="180px" height="50px" >
	</div>
	<div class="menu">
			<ul class="am-list admin-sidebar-list" id="collapase-nav-1">
		  <li class="am-panel">
		    <a data-am-collapse="{parent: '#collapase-nav-1', target: '#company-nav'}">
		        <i class="am-icon-table am-margin-left-sm"></i> 商品管理 <i class="am-icon-angle-right am-fr am-margin-right"></i>
		    </a>
		    <ul class="am-list am-collapse admin-sidebar-sub" id="company-nav">
		        <li><a href="/admin/addpets"><span class="am-icon-table am-margin-left-sm"></span> 添加狗狗 </a></li>
		        <li><a href="/admin/petDetails"><span class="am-icon-table am-margin-left-sm"></span> 狗狗列表 </a></li>
		        <li><a href="/admin/addpetGoods"><span class="am-icon-table am-margin-left-sm"></span> 添加商品 </a></li>
		        <li><a href="/admin/petGoodDetails"><span class="am-icon-table am-margin-left-sm"></span> 商品列表 </a></li>
		    </ul>
		  </li>
		</ul>
	</div>
	<div class="content">
		<div class="content1">
		当前位置：商品列表
			
		</div>
		<div class="detail">
		<c:if test="${empty petGoods}">
        	<h2>暂无任何信息</h2>
        </c:if>
        <c:if test="${!empty petGoods}">
		<a id="btn0"></a>
                <input id="pageSize" type="text" size="1" maxlength="2" value="8"  readonly="readonly"/><a> 条 </a> 
                <a id="sjzl"></a>&nbsp;
                <a  href="#" id="btn1">首页</a>
                <a  href="#" id="btn2">上一页</a>
                <a  href="#" id="btn3">下一页</a>
                <a  href="#" id="btn4">尾页</a>&nbsp;
                <a>转到&nbsp;</a>
                <input id="changePage" type="text" size="1" maxlength="4"/>
                <a>页&nbsp;</a>
                <a  href="#" id="btn5">跳转</a>
			<table id="customers">
				<tr>
				<th>商品编号</th>
				<th>商品名称</th>
				<th>商品库存</th>
				<th>商品价格</th>
				<th>操作</th>
				</tr>
			<c:forEach var="petGood" items="${petGoods}">
				<tr>
				<td>${petGood.goodId}</td>
				<td>${petGood.goodName}</td>
				<td>${petGood.stock}</td>
				<td>￥${petGood.price}</td>
				<td><a href="/admin/petGoodDetails/${petGood.goodId}">修改</a> <a href="/admin/deletepetGood?goodId=${petGood.goodId}">删除</a></td>
				</tr>
			</c:forEach>
			</table>
			</c:if>
		</div>
	</div>
</div>
<script src="/resources/js/jquery-3.1.1.min.js"></script>
<script src="/resources/js/amazeui.min.js"></script>
<script src="/resources/js/fenye.js"></script>
</body>
</html>